{% extends "rango/base.html" %}
{% load static %}
{% block title %}Search{% endblock %}
{% block body_block %}
<div class="hero-unit">
    <h1>Search with Rango</h1>
    <br/>

    <div class="container-fluid">
        <form class="form-signin span8" id="user_form" method="post" action="/rango/search/">
            {% csrf_token %}
            <!-- Display the search form elements here -->
            <input type="text" size="50" name="query" value="" id="query" /><br/>
            <input class="btn btn-primary" type="submit" name="submit" value="Search" />
        </form>

        {% if result_list %}
        <!-- Display search results in an ordered list -->
        <div style="clear: both;">
            <ol>
            {% for result in result_list %}
                <li>
                    <strong><a href="{{ result.link }}">{{ result.title }}</a></strong><br />
                    <em>{{ result.summary }}</em>
                </li>
            {% endfor %}
            </ol>
        </div>
        {% endif %}
    </div>
</div>
{% endblock %}